package com.zsl.vcode.web;
import com.zsl.bean.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice//Aop实现异常拦截，通知:前置、后置、异常、环绕、返回
public class ExHandler {
    @ExceptionHandler(VcodeException.class)
    Object handleVcodeException(VcodeException e){
        return new Result(0,e.getMessage(),null);
    }
}
